package com.bee.mydiary;

import com.bee.mydiary.camera.CameraActivity;
import com.bee.mydiary.diary.DiaryActivity;
import com.bee.mydiary.footprint.FootprintActivity;
import com.bee.mydiary.record.RecordActivity;
import com.bee.mydiary.utils.ComFunctions;
import com.bee.mydiary.video.VideoActivity;

import android.app.Activity;
import android.content.Intent;
import android.hardware.Camera;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class NewActivity extends Activity {

	Button diary_new = null;
	Button camera_new = null;
	Button video_new = null;
	Button record_new = null;
	Button footprint_new = null;
	
	Camera mCamera;	
	boolean isPreview = false;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {

 		super.onCreate(savedInstanceState);
 		setContentView(R.layout.table_new);
 		
 		diary_new = (Button)findViewById(R.id.diary_new);
 		diary_new.setOnClickListener(onclick);
 		camera_new = (Button)findViewById(R.id.camera_new);
 		camera_new.setOnClickListener(onclick);
 		video_new = (Button)findViewById(R.id.video_new);
 		video_new.setOnClickListener(onclick);
 		record_new = (Button)findViewById(R.id.record_new);
 		record_new.setOnClickListener(onclick);
 		footprint_new = (Button)findViewById(R.id.footprint_new);
 		footprint_new.setOnClickListener(onclick);
 		
 		ComFunctions.getSDPath(this);
	}


	OnClickListener onclick = new OnClickListener() {

		@Override
		public void onClick(View arg0) {
			// TODO Auto-generated method stub

	  		Intent intent = new Intent();
	  		
			switch(arg0.getId()) {
			case R.id.diary_new:
		  		intent.setClass(getApplicationContext(),DiaryActivity.class);  	
				break;
			case R.id.camera_new:
		  		intent.setClass(getApplicationContext(),CameraActivity.class);  
				break;
			case R.id.video_new:
		  		intent.setClass(getApplicationContext(),VideoActivity.class);  
				break;
			case R.id.record_new:
		  		intent.setClass(getApplicationContext(),RecordActivity.class);  
				break;
			case R.id.footprint_new:
		  		intent.setClass(getApplicationContext(),FootprintActivity.class);  
				break;
			}
			startActivity(intent);
		}
	};
}
